package com.wzdigit.wms.basic.mapper.core.basic;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wzdigit.framework.orm.mybatis.MyBatisRepository;
import com.wzdigit.wms.basic.domain.basic.Zone;
import com.wzdigit.wms.basic.client.request.basic.SearchZoneRequest;
import com.wzdigit.wms.basic.client.response.basic.ZoneApiResponse;
import com.wzdigit.wms.basic.client.response.basic.ZoneResponse;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 库区  Mapper 接口
 * </p>
 *
 * @author 
 * @since 2020-12-28
 */
@MyBatisRepository
public interface ZoneMapper extends BaseMapper<Zone> {
	
	@SuppressWarnings("rawtypes")
	List<ZoneResponse> selectAll(@Param("dto") SearchZoneRequest dto);

	ZoneResponse selectOneByZoneId(@Param("zoneId") Integer zoneId);

	List<ZoneApiResponse> selectAllByWhsIdAndStatus(
			@Param("whsId") Integer whsId, @Param("status") Integer status);

	List<ZoneApiResponse> selectAllByZoneGroupIds(
			@Param("zoneGroupId") Integer zoneGroupId);

	Zone selectOneByZoneCode(@Param("zoneCode") String zoneCode);

	Zone selectOneByZoneName(@Param("zoneName") String zoneName);
	
	int updateStatus(Zone record);
	
    int deleteByPrimaryKey(Integer zoneId);

    int insert(Zone record);

    Zone selectByPrimaryKey(Integer zoneId);

    int updateByPrimaryKeySelective(Zone record);

    int updateByPrimaryKey(Zone record);
}